package link.gpt.dao;

import link.gpt.pojo.NewsDetail;
import link.gpt.pojo.NewsDetailExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NewsDetailDao {
   long countByExample(NewsDetailExample example);

   int deleteByExample(NewsDetailExample example);

   int deleteByPrimaryKey(Integer id);

   int insert(NewsDetail record);

   int insertSelective(NewsDetail record);

   List<NewsDetail> selectByExample(NewsDetailExample example);

   NewsDetail selectByPrimaryKey(Integer id);

   int updateByExampleSelective(@Param("record") NewsDetail record, @Param("example") NewsDetailExample example);

   int updateByExample(@Param("record") NewsDetail record, @Param("example") NewsDetailExample example);

   int updateByPrimaryKeySelective(NewsDetail record);

   int updateByPrimaryKey(NewsDetail record);

   /**
    * 根据标题查询或查询全部
    * @param title
    * @return
    */
   List<NewsDetail> findAllByTitleAndPage(String title);
}